/**
* @file json_parser_utils.h
*
* Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

#ifndef ASCEND_COMMON_JSON_PARSER_UTILS_H_
#define ASCEND_COMMON_JSON_PARSER_UTILS_H_

#include "nlohmann/json.hpp"
#include "acl/acl_base.h"

namespace acl {
    // 该类实现和JsonParser类似，区别在JsonParser对文件进行解析，JsonParserUtils对文件内容进行解析
    // 开源开放完成后JsonParser留在acl_rt模块，JsonParserUtils按需挪到其他模块(如acl_model等)
    class JsonParserUtils {
       public:
        static aclError ParseJson(const char *const buffer, nlohmann::json &js);
        static aclError GetJsonCtxByKey(const char *const buffer,
                                        std::string &strJsonCtx, const std::string &subStrKey, bool &found);
    };
} // namespace acl

#endif  //ASCEND_COMMON_JSON_PARSER_UTILS_H_
